home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 February
/
Macworld (1999-02).dmg
/
Games World
/
Hot Demos!
/
DroidWorks demo
/
dwCD.gob
/
mission_cog_item_batteryl.cog
< prev
next >
Wrap
Text File
|
1998-09-17
|
1KB
|
45 lines
# Jedi Knight Cog Script
#
# POW_BACTA.COG
#
# POWERUP Script - Bacta tank
#
# [YB & CYW]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
symbols
thing powerup local
thing player local
int bin=18 local
flex amount local
message activate
message taken
sound powerupSound=NRGbattery.wav local
end
# ========================================================================================
code
taken:
player = getlocalplayerthing();
amount = GetInv(player, bin);
powerup = GetSenderRef();
print("large battery taken");
if (amount < GetInvMax(player, bin))
{
dwFlashInventory();
dwplaycammyspeech(0, "ghca001.wav", 0.1, 1);
playsoundlocal(powerupSound, 1.0, 0.0, 0);
destroything(powerup);
SetInvAvailable(player,bin,1);
ChangeInv(player, bin, 1);
}
return;